import Router from '@koa/router'
import {
    deleteParkRecordByIdController,
    getParkRecordPageController,
    postParkRecordController,
    putParkRecordByIdController,
    getParkRecordOptionListController,
    getLastParkRecordPageController,
    getParkRecordById
} from '../controllers/parkRecord'

const parkRecordRouter = new Router({
    prefix: '/park-record',
})

// 用户的增删改查
parkRecordRouter.get('/', getParkRecordPageController) // 获取用户列表
parkRecordRouter.get('/option-list', getParkRecordOptionListController) // 获取用户列表
parkRecordRouter.get('/last-park-record', getLastParkRecordPageController) // 获取最后一条停车记录
parkRecordRouter.get('/:id', getParkRecordById) // 获取用户列表
parkRecordRouter.post('/', postParkRecordController) // 添加用户
parkRecordRouter.put('/:id', putParkRecordByIdController) // 修改用户信息
parkRecordRouter.delete('/:id', deleteParkRecordByIdController) // 删除用户


export default parkRecordRouter
